/*
* Sun Public License Notice
*
* The contents of this file are subject to the Sun Public License
* Version 1.0 (the "License"). You may not use this file except in
* compliance with the License. A copy of the License is available at
* http://www.sun.com/
*
* The Original Code is NetBeans. The Initial Developer of the Original
* Code is Sun Microsystems, Inc. Portions Copyright 1997-2001 Sun
* Microsystems, Inc. All Rights Reserved.
*/
package org.netbeans.modules.vcs.advanced;
/**
*
* @author Michal Fadlajevic
* @version
*/
public class RenameConfigurationDialog extends javax.swing.JDialog {
static final long serialVersionUID =-3993063190436302423L;
/** Initializes the Form */
public RenameConfigurationDialog(java.awt.Frame parent, boolean modal) {
super (parent, modal);
initComponents ();
pack ();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the FormEditor.
*/
private void initComponents () {//GEN-BEGIN:initComponents
// This code was developed using a non-commercially licensed version of NetBeans Developer 2.x.
// For details, see http://www.netbeans.com/non_commercial.html
setBackground (new java.awt.Color (192, 192, 192));
setTitle ("Rename configuration:");
addWindowListener (new java.awt.event.WindowAdapter () {
public void windowClosing (java.awt.event.WindowEvent evt) {
closeDialog (evt);
}
}
);
getContentPane ().setLayout (new java.awt.GridBagLayout ());
java.awt.GridBagConstraints gridBagConstraints1;
oldNameLabel = new javax.swing.JLabel ();
oldNameLabel.setText ("Old name:");
gridBagConstraints1 = new java.awt.GridBagConstraints ();
gridBagConstraints1.gridx = 0;
gridBagConstraints1.gridy = 0;
gridBagConstraints1.insets = new java.awt.Insets (5, 5, 5, 5);
gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints1.weightx = 0.1;
getContentPane ().add (oldNameLabel, gridBagConstraints1);
oldNameTextField = new javax.swing.JTextField ();
oldNameTextField.setColumns (30);
oldNameTextField.setText ("StarTeam 3.0");
oldNameTextField.setEditable (false);
gridBagConstraints1 = new java.awt.GridBagConstraints ();
gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints1.insets = new java.awt.Insets (5, 5, 5, 5);
gridBagConstraints1.weightx = 0.9;
getContentPane ().add (oldNameTextField, gridBagConstraints1);
newNameLabel = new javax.swing.JLabel ();
newNameLabel.setText ("New name:");
gridBagConstraints1 = new java.awt.GridBagConstraints ();
gridBagConstraints1.gridx = 0;
gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST;
getContentPane ().add (newNameLabel, gridBagConstraints1);
bottomPanel = new javax.swing.JPanel ();
bottomPanel.setLayout (new java.awt.FlowLayout (2, 5, 5));
okButton = new javax.swing.JButton ();
okButton.setText ("OK");
okButton.setLabel ("OK");
okButton.setName ("OK");
okButton.addActionListener (new java.awt.event.ActionListener () {
public void actionPerformed (java.awt.event.ActionEvent evt) {
okButtonActionPerformed (evt);
}
}
);
bottomPanel.add (okButton);
cancelButton = new javax.swing.JButton ();
cancelButton.setText ("Cancel");
cancelButton.setLabel ("Cancel");
cancelButton.setName ("CANCEL");
cancelButton.addActionListener (new java.awt.event.ActionListener () {
public void actionPerformed (java.awt.event.ActionEvent evt) {
cancelButtonActionPerformed (evt);
}
}
);
bottomPanel.add (cancelButton);
gridBagConstraints1 = new java.awt.GridBagConstraints ();
gridBagConstraints1.gridx = 0;
gridBagConstraints1.gridwidth = 2;
gridBagConstraints1.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints1.anchor = java.awt.GridBagConstraints.EAST;
getContentPane ().add (bottomPanel, gridBagConstraints1);
newNameTextField = new javax.swing.JTextField ();
newNameTextField.setColumns (30);
newNameTextField.setText (" ");
newNameTextField.addActionListener (new java.awt.event.ActionListener () {
public void actionPerformed (java.awt.event.ActionEvent evt) {
jTextField2ActionPerformed (evt);
}
}
);
gridBagConstraints1 = new java.awt.GridBagConstraints ();
gridBagConstraints1.gridy = 1;
gridBagConstraints1.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints1.insets = new java.awt.Insets (0, 5, 5, 5);
getContentPane ().add (newNameTextField, gridBagConstraints1);
}//GEN-END:initComponents
private void okButtonActionPerformed (java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
System.err.println("OK pressed");
}//GEN-LAST:event_okButtonActionPerformed
private void cancelButtonActionPerformed (java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
System.err.println("Cancel pressed");
setVisible(false);
dispose();
}//GEN-LAST:event_cancelButtonActionPerformed
private void jTextField2ActionPerformed (java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField2ActionPerformed
// Add your handling code here:
}//GEN-LAST:event_jTextField2ActionPerformed
/** Closes the dialog */
private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog
setVisible (false);
dispose ();
}//GEN-LAST:event_closeDialog
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel oldNameLabel;
private javax.swing.JTextField oldNameTextField;
private javax.swing.JLabel newNameLabel;
private javax.swing.JPanel bottomPanel;
private javax.swing.JTextField newNameTextField;
private javax.swing.JButton okButton;
private javax.swing.JButton cancelButton;
// End of variables declaration//GEN-END:variables
public static void main(java.lang.String[] args) {
new RenameConfigurationDialog (new java.awt.Frame (), false).show ();
}
}
/*
* <<Log>>
* 5 Gandalf 1.4 11/27/99 Patrik Knakal
* 4 Gandalf 1.3 10/25/99 Pavel Buzek copyright
* 3 Gandalf 1.2 10/23/99 Ian Formanek NO SEMANTIC CHANGE - Sun
* Microsystems Copyright in File Comment
* 2 Gandalf 1.1 5/27/99 Michal Fadljevic
* 1 Gandalf 1.0 5/4/99 Michal Fadljevic
* $
*/